//
//  CSMapSearchListResultCell.swift
//  Cycling
//
//  Created by CSS on 4/3/23.
//

import UIKit
import MapboxSearch

class CSMapSearchListResultCell: UITableViewCell {

    @IBOutlet private weak var nameLbl: UILabel!
    @IBOutlet private weak var detailLbl: UILabel!
    
    public var searchResult: SearchResult? {
        didSet {
            nameLbl.text = searchResult?.name
            detailLbl.text = searchResult?.address?.formattedAddress(style: .long)
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        
        selectionStyle = .none
        backgroundColor = .white
        addSegmentLine()
    }
    
}
